package com.iceflame.zxingane;

import com.adobe.fre.FREContext;
import com.adobe.fre.FREExtension;

public class ZXingAne implements FREExtension {
	
	private static FREContext frec = null;

	@Override
	public FREContext createContext(String arg0) {
		return frec;
	}

	@Override
	public void dispose() {
		frec = null;
	}

	@Override
	public void initialize() {
		frec = new ZXingContext();
	}
	
	public static void dispatchEvent(String type,String arg){
		if(frec != null){
			frec.dispatchStatusEventAsync(type, arg);
		}
	}

}
